<?php

class SourceFactory{
	
	// Parameterized factory method
	public static function makeSource($type)
	{
		if ( include_once './Drivers/' . $type . '.php' ) {
				$classname = 'Driver_' . $type;
				echo $classname;
				return new $classname;
				
		}else {
			throw new Exception('Driver: ' . $type . ' not found!');
		}
	}
}
?>